package weWork;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

import java.util.ArrayList;
import java.util.List;

public class MainPage extends BasePage{
    public MainPage(WebDriver driver) {
        super(driver);
    }

    List<String> getMessages(){
        List<String>messages=new ArrayList<>();
        messages.add("1");
        return messages;
    }


    public ContactPage toContact(){
        driver.findElement(By.linkText("通讯录")).click();
        return new ContactPage(driver);

    }
    public AppPage toApp(){
        driver.findElement(By.linkText("应用管理")).click();
        driver.findElement(By.xpath("//*[@url='#announcement']//*[@class='app_index_item_title']")).click();
        return new AppPage(driver);
    }


}
